#ifndef __ALBUM_ASTRO_H__
#define __ALBUM_ASTRO_H__

#include "sqlite3.h"
#include "common_info.h"

#include <ctime>
#include <vector>
#include <string>


// typedef struct {
//     std::string file_path;
//     std::time_t modification_time;
//     std::string thumbnail_path;
//     std::string file_size;
//     std::string dec;
//     std::string ra;
//     std::string target;
//     std::string binning;
//     std::string format;
//     int exp_time;
//     int gain;
//     int shotsToTake;
//     int shotsTaken;
//     int shotsStacked;
// } AstroInfo;


class AlbumAstro {
public:
    AlbumAstro();
    ~AlbumAstro();

    int createAstroInfoTable(sqlite3* db);
    int insertAstroInfo(const AstroInfo& astro_info);
    std::vector<AstroInfo> queryAstroInfoByTime();
    std::vector<AstroInfo> queryAllAstroInfo();
    std::vector<AstroInfo> queryAstroInfoByFilepath(const std::string& file_path);
    bool updateAstroInfo(const std::string& file_path, const std::string& new_filename);
    bool deleteAstroInfo(const std::string& file_path);
    void printAstroInfo(const AstroInfo& astro_info);
    int getCount();
    std::vector<AstroInfo> queryAstroInfoByTime(int page, int items_per_page);
    bool deleteDirectory(const std::string& file_path);
    bool renameDirectory(const std::string& file_path, const std::string& new_astro_name);
    int updateAstro(const std::string& folder_path);
};



#endif